package com.int_tech.MessageCodeAll.entity;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liubochao on 2018/6/22.
 */
@Entity
@Table(name = "c_code_A2")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class CodeA2 {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //车牌号
    @Column(length = 64)
    private String carNumber;

    //源数据
    @Column(length = 2048)
    private String dataString;

    //lng
    @Column(length = 64)
    private String lng;

    //lat
    @Column(length = 64)
    private String lat;

    //开关门状态（0，开门；1，关门）
    @Column(length = 2)
    private int openStatus;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createdTime;

    //更新时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedTime;

    //状态(0,初始状态；1，获取验证地理位置；2，获取位置异常）
    @Column(length = 2)
    private int status;

    //开关门地址
    @Column(length = 128)
    private String location;

    //是否在场站内(1，在场站内；-1，不在场站内）
    @Column(length = 2)
    private String isInStation;

    //当前场站坐标组
    @Column(length = 1280)
    private String stationLocations;

    //状态(0,初始状态;不为0即处理完成）
    @Column(length = 2)
    private int checkStatus;

}
